package com.security.system.controller;

import com.security.system.service.SysUserService;
import com.security.utils.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@RequestMapping("user")
public class UserController {

    @Resource
    SysUserService service;

    @GetMapping("userList")
    public String getNewsListHtml(){
        return "system/user/userList2";
    }

    @PostMapping("userTableData")
    @ResponseBody
    public R UserTableData(@RequestBody Map<String,Object> param){
        return service.UserTableData(param);
    }

    @GetMapping("userGrade")
    public String getNewsAddHtml(){
        return "system/user/userGrade";
    }

    @GetMapping("userAdd")
    public String getUserAddHtml(Map<Object,Object> map){
        map.put("a","aaaaaa");
        return "system/user/UserAdd";
    }
}
